import os, uvicorn
from plus.app_vllm import getService
funasr = None
module = os.environ['SERVICE_MODULE']
if module.lower().find('asr') > -1:
    import funasr # type: ignore
app = getService(funasr)
try:
    tts_port = int(os.environ['SERVICE_PORT'])
except:
    tts_port = 7860
tts_host = os.environ['SERVICE_HOST']

if __name__ == "__main__":
    # app.queue(20)
    # app.launch(server_name=tts_host)
    uvicorn.run(app, host=tts_host, port=tts_port)